<template>
  <view class="traffic">
    <image
      src="https://lishiots.oss-cn-hangzhou.aliyuncs.com/webstatic/outing-fun/trafficBg.png"
      mode="aspectFill"
      class="img"
    />
    <view class="btnBox">
      <button class="btn" @click="jump">
        去看看
      </button>
    </view>
		<!-- <web-view src="https://main.m.taobao.com/"></web-view> -->
  </view>
</template>

<script>
import 'dingtalk-jsapi/entry/mobile';
import openLink from 'dingtalk-jsapi/api/biz/util/openLink';
export default {
  methods: {
    jump() {
      if(!dd.corpId) return uni.showToast({title: '未获取到用户信息，请尝试退出重新打开小程序'});
      const url = encodeURI(`http://114.55.151.214/wxobt/#/dingding?corpId=${dd.corpId}`);
      openLink({
        url,
        onSuccess: (res) => {
          console.log('跳转成功', res, dd.corpId);
        },
        onFail: function (err) {
          console.log('跳转失败', err);
        },
      });
    }
  },
};
</script>

<style lang="less" scoped>
.traffic {
  .img {
    width: 100vw;
    height: 100vh;
  }
  .btnBox {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 0);
    margin-bottom: 20rpx;
  }
  .btn{
    width: 590rpx;
    // height: 82rpx;
    background: linear-gradient(180deg, #84b5ff 0%, #3a64f8 100%);
    border-radius: 51rpx;
    font-size: 34rpx;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: 1rpx;
  }
}
</style>
